package com.neu.his.entity;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.List;

@Data
public class User extends Base {
    private String userName;
    private String passWord;
    private String name;

    @TableField(exist = false)
    private List<Department> departmentList;
    @TableField(exist = false)
    private List<Role> roleList;
    @TableField(exist = false)
    private Doctor doctor;
    @TableField(exist = false)
    private MedDoctor medDoctor;

    public User(String userName, String passWord, String name){
        this.userName=userName;
        this.passWord=passWord;
        this.name=name;
    }

    public User(String userName, String passWord, String name,Long id){
        this.userName=userName;
        this.passWord=passWord;
        this.name=name;
        this.id=id;
    }

    public User(){}

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
